
#ifndef __PENDINA_TRX_FRAMEWORK__
#define __PENDINA_TRX_FRAMEWORK__

#include "pendina_trx_core.h"


// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the PENDINA_TRX_FRAMEWORK_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// PENDINA_TRX_FRAMEWORK_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef PENDINA_TRX_FRAMEWORK_EXPORTS
#define PENDINA_TRX_FRAMEWORK_API __declspec(dllexport)
#else
#define PENDINA_TRX_FRAMEWORK_API __declspec(dllimport)
#endif

// This class is exported from the pendina_trx_framework.dll
class PENDINA_TRX_FRAMEWORK_API pendina_trx_framework 
{
	pendina_standalone *internalTRX;
public:
	 pendina_trx_framework();
	~pendina_trx_framework();

	//
	bool is_running();
	void reset_trx();
	void start_trx();
	void stop_trx();

	//
	SmartPtr<NetworkStream> get_incoming();
	void send_outgoing(SmartPtr<NetworkStream> &);
	
};

extern "C" PENDINA_TRX_FRAMEWORK_API pendina_trx_framework* CreateTransceiver();
extern "C" PENDINA_TRX_FRAMEWORK_API void DestroyTransceiver(pendina_trx_framework *);

extern "C" PENDINA_TRX_FRAMEWORK_API void StartTransceiver(pendina_trx_framework *);
extern "C" PENDINA_TRX_FRAMEWORK_API void StopTransceiver(pendina_trx_framework *);
extern "C" PENDINA_TRX_FRAMEWORK_API void ResetTransceiver(pendina_trx_framework *);

extern "C" PENDINA_TRX_FRAMEWORK_API unsigned int send_data(pendina_trx_framework *, unsigned char *, unsigned int );
extern "C" PENDINA_TRX_FRAMEWORK_API unsigned int get_data(pendina_trx_framework *pref, unsigned char *&data);
extern "C" PENDINA_TRX_FRAMEWORK_API void free_data(pendina_trx_framework *, unsigned char *&data);

#endif
